home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-05
/
pcg105r3.zip
/
PCG2.DOC
< prev
next >
Wrap
Text File
|
1993-03-14
|
40KB
|
944 lines
PC Gopher II
Version 1.05
21 August 1992
Daniel A. Torrey
Computer and Information Services/User Assistance and Planning
University of Minnesota
Room 132 Shepherd Labs
100 Union St. SE
Minneapolis, MN 55455
I. Introduction
This manual describes PC Gopher II, hereafter referred to as Gopher, a
program for IBM and compatible microcomputers that run the MS-DOS operating
system. PC Gopher II is a program that lets you search for and retrieve
information stored on other computers, known as "gopher servers".
Individuals and departments at the University of Minnesota need fast
access to large amounts of information. Additionally, the departments
responsible for this information need a fast and simple way to make
information available. The Gopher Project was started in response to
these needs; Gopher will allow you to navigate through a universe of
information provided by gopher servers. Information is distributed
amongst the gopher servers, but you don't need to know anything about
where the information is. Once the Gopher program has connected to one
gopher server, you will be able to browse through information on any
additional gopher servers that the first server knows about.
Information is presented in the form of lists of items; items can be
files, directories (somewhat like DOS directories) containing other
directories or files, or search items, representing computers that
will perform searches for files containing text that you specify.
Once you've found a file containing the information you need, Gopher
can display the file in a window; it can also save it as a text file for
you to view or edit with the word processor of your choice.
Gopher uses the standard IBM character set to emulate a graphical
user interface (GUI). For this reason, Gopher runs on a wide range
of IBM PCs and compatibles, including the earliest PCs which contained a
monochrome display adapter (with no graphics support). In other words,
Gopher does not require that you install a special graphics display
adapter in your computer.
With a GUI, you interact with the program by responding to graphical
symbols which appear on the computer screen, rather than by issuing
single line commands (as with the MS-DOS operating system). Because of
its graphical user interface, Gopher is largely self-explanatory. If
you are familiar with the GUI in Microsoft Windows or the Apple
Macintosh operating system, you will be able to run Gopher without
much help from this manual.
We allow free distribution of Gopher to all interested parties as
long as our copyright notices are not altered or removed and you do not
charge others for distribution of our software.
Help!
If you run into difficulties installing or using Gopher, or have bug
reports, suggestions, or general comments, you can send E-mail to us at:
gopher@boombox.micro.umn.edu
or if you prefer paper mail:
Gopher Project
Microcomputer & Workstation Networks Center
University of Minnesota
Room 125 Shepherd Labs
100 Union St. SE
Minneapolis, MN 55455
U.S.A.
In all of your correspondence pertaining to Gopher, please indicate:
- your PC Gopher II version number; and
- your operating system and version number (e.g., DOS 3.2).
II. The Gopher User Interface
Gopher's user interface consists of several elements:
Lists
Lists are boxes containing one or more lines of text, with a "scroll bar"
along the right side of the box. The scroll bar allows you to see items
in the list that aren't displayed on the screen; to scroll the list, click on
the up or down arrows at the top and bottom of the scroll bar with the
mouse, or use the arrow keys.
There is always one item in the list that's the "currently selected" item;
if you click on it, or hit the enter key, the list will perform its default
action on that item. The currently selected item is indicated by
highlighting; the text and background colors of the currently selected item
are colored differently than the rest of the list, or are shown in inverse
video on a monochrome monitor.
Buttons
Buttons are rectangular areas of the screen which will respond to a mouse
click by performing some action. Buttons can also be operated by repeatedly
hitting the <TAB> key until the button is highlighted, and then hitting
the <ENTER> key.
Dialog Boxes
Dialog boxes allow Gopher to ask you for information. For example, when
you choose an search item from the list of available items, a dialog box
will pop up to allow you to enter the text to search for.
Dialog boxes are also used to inform you of errors while Gopher is running.
When one of these error dialog boxes pops up, you must click on the OK
button (or hit <ENTER> on the keyboard) before you can continue using
the program.
A dialog box can consist of many elements; buttons, fields to enter
text, list boxes, and so on. If you are using a keyboard rather than
a mouse, you'll need to use the <TAB> key to select these various elements
before you can use them.
Windows
Gopher uses windows to display information. There are two different
types of windows in Gopher; the Gopher window, which displays lists
of items for you to choose from, and the file display window, which
displays the contents of a file that you've chosen.
Both windows can be positioned anywhere on the screen, with the mouse or
the keyboard. To move a window with the mouse, position the cursor over
the title bar of the window (the horizontal line marking the window's
top edge), then press and hold the mouse button as you move the mouse.
To move a window with the keyboard, type Ctrl-F5, and use the arrow keys
to move the window around the screen.
In the upper left-hand corner of each window is a small rectangle
enclosed in square brackets. This is the window's close box; clicking
with the mouse in the close box will close the window. To close a
window using the keyboard, type "Alt-F3".
In addition to these capabilities, the file display window can be
resized. To resize the window with the mouse, position the cursor in
the lower right-hand corner, press the mouse button, and move the mouse.
To resize the window from the keyboard, type "Ctrl-F5" (just like you
did to move the window), hold the shift key down, and use the arrow
keys.
The Menu Bar
The very top line of the computer screen contains Gopher's menu bar
with three menu labels. The menu bar looks like this:
# File Window Options
The menu bar is the primary mechanism you use to communicate with Gopher.
The menus have pull-down labels; that is, when you select a title in the
menu bar, a list of specific commands are dropped down from the menu label
and displayed in a list.
If one of the commands in a pull-down menu is followed by three periods (...),
choosing that command will display a dialog box, requesting further
information. If a command in a pull-down menu is not followed by three
periods, this means that once you choose it, the indicated action will occur
immediately.
You can use either a mouse or keyboard to select commands. To use a
mouse, click on the desired menu title to display the pull-down menu.
(use only the left mouse button if your mouse has more than one button).
Then click the desired command. Alternatively, you can push the mouse
button down over a menu title and then continue to hold the mouse button
down while you drag straight down from the menu title to the desired
menu command, and then release the mouse button. If you decide not to
choose a command, just drag out of the boundaries of the pull-down menu
and no action will be performed.
To choose menu commands using the keyboard, first pull down the menu.
You do this by pressing the F10 key to make the menu bar active; when
the menu bar is active, one menu title is highlighted. If the menu
title you want is not the one currently highlighted, use the arrow keys
to move to the right or left along the menu bar, until the menu title
you want to select appears highlighted. Then press the <ENTER> key to
pull down the menu.
There is also hot-key alternative to pull down a menu. Hold the Alt key
down while typing the letter corresponding to the first letter of the menu
title you want; for example, type Alt-F to pull down the File menu.
The hot key to pull-down the # menu (called the system menu) is Alt-Spacebar.
Once the menu you want is pulled down, use the up and down arrow keys to
highlight the command you want, and press <ENTER> to perform the highlighted
command. You can also press the key corresponding to the highlighted letter
of the desired command.
In addition to the four menus, there are two indicators at the left end of
the menu bar. The first indicator shows how much RAM is available to the
program; the second one is a clock.
Menu Structure
The individual items under the pull-down menus are organized as follows.
Highlighted letters (shown here as capital letters) are used to perform
the various short-cuts described in the previous section and elsewhere
in this manual.
Note that the key (capital) letter associated with each command is not
always the first letter of the command. In addition, some menu
commands are considered to be so important that they can be activated
with a keyboard alternative (in other words, without having to pull down
any menu first). These keys are also shown below.
The Preferences menu has a submenu listing user-configurable preferences;
this submenu works the same way that the other menus do.
Menu Title Commands Keyboard Alternative
# About PC Gopher II
Calculator
caLendar
Puzzle
DOS Shell
File new Gopher Alt-G
Save file... Alt-S
Item inspector... Alt-I
Open bookmark list F9
eXit Alt-X
Window Next F6
Zoom F5
Move Ctrl-F5
close Alt-F3
Options
Configure... Alt-C
Preferences >
Mouse...
Video Mode
The Status Bar
Gopher's status bar is located across the bottom line of the screen.
The status bar looks like this:
F10 Menus Alt-X Exit Alt-G New Gopher Alt-F3 Close
The status bar contains "hot spots". Hot spots are located wherever words
occur in the status bar. For example, "Alt-G New Gopher" constitutes
one hot spot. Hot spots are separated from each other by more than one
space. When you click on a hot spot with a mouse, the indicated
function will occur. For example, when you click on the words "Alt-G
New Gopher", Gopher will open a new Gopher window, and when you click
on the words "Alt-X Exit", Gopher will shut down and return you to
the DOS prompt.
To activate a hot spot without using a mouse, hold down the Alt key, and
type the letter indicated in the status bar. For example, if you hold
down the Alt key and press the F3 function key, Gopher will close the
frontmost window.
III. Installation
System Requirements
To run Gopher, your microcomputer must be connected to a local area
network (LAN). Usually, the LAN will be connected to the campus
backbone network, allowing you to find information located on gopher
servers outside of your network.
For your microcomputer to operate on the LAN, you must have a network
adapter card installed. In order to run Gopher, your network adapter
card must be one supported by the Clarkson packet drivers, mentioned in
the "Configuring Gopher" section below. A set of the most popular packet
drivers is available from boombox.micro.umn.edu, in the directory
/pub/gopher/PC_client/drivers
Installation instructions are included with the packet drivers.
Gopher runs under DOS version 3.2 or greater and requires 640K of
RAM. Gopher was designed to run on a wide range of IBM PCs and
compatibles, including the earliest PCs which contained only a
monochrome display adapter, with no graphics support.
A Microsoft-compatible mouse is helpful but optional. You must load
mouse driver software into your system before running Gopher. Note
also that if your mouse contains more than one mouse button, you will only
need to use the left mouse button when running Gopher.
How to Obtain The Gopher Software
The Gopher software consists of two files: GOPHER.EXE and GOPHER.OVR.
You can obtain the software over the internet via anonymous FTP from
boombox.micro.umn.edu
Look in the UNIX directory called
/pub/gopher/PC_client
Loading Gopher and the Clarkson Packet Driver
Each Clarkson packet driver is a specialized piece of software designed
to talk to a specific type of network adapter card. In order to run PC
Gopher, the appropriate Clarkson packet driver must be loaded into RAM
(random-access memory) each time you start up your computer. To do
this, you first run the appropriate packet driver by typing the packet
driver name, followed by the necessary parameters, as described in the
documentation that comes with the packet driver set. If you'd like the
packet driver to load automatically whenever you start up your computer,
you can add the packet driver command and parameters to your AUTOEXEC.BAT
file.
After you have installed the appropriate packet driver, copy all of the
Gopher files into a directory on your hard disk.
For example, suppose you have a 3Com 3c523 ethernet card installed in
your PC. The following two command lines represent an example of the
steps needed to load the packet driver and start Gopher (of course,
the specific packet driver and parameters will depend on your
configuration). Type each line following the command prompt and end
each line by pressing the <ENTER> key:
3C523 0x60 0x3 0x300
GOPHER
As long as you do not turn the power off to your computer, you can quit
Gopher and do other things and then start Gopher again without re-loading
the packet driver. Also if you already have the packet driver loaded for other
programs like FTP, Telnet, or tn3270, you do not need to re-load the packet
driver before running Gopher.
There are several command-line parameters that Gopher understands; for more
information, see the section entitled "Command-Line Parameters".
IV. Configuring Gopher
When you use Gopher for the first time, you need to enter some
configuration information specific to your microcomputer. Gopher
needs these configuration parameters in order to identify your computer
on the network. Before you can enter this configuration data, you need to
create a "resource file", which will hold the configuration data from one
session to the next.
To create this file, run gopher with the /INIT switch, like this:
C:\> GOPHER /INIT
Gopher will start up, create the resource file (GOPHER.REZ), and then quit.
Note that running gopher with the /INIT switch will destroy any old resource
files that you have lying around, so don't do this unless necessary! If you
create a new resource file, you'll have to go through the configuration process
(below) again.
Now you're ready to configure Gopher. Start Gopher by typing
C:\> GOPHER
Gopher will look at the resource file, see that you haven't yet entered
the necessary configuration information, and pop up a "Configure" dialog
box. You must enter all of the requested parameters, according to the
instructions which follow. (Consult your network administrator for the
correct parameter information .) You will not need to enter parameter
information during subsequent Gopher sessions, because Gopher will save
the parameters you have entered. You can modify your configuration
settings at any time by selecting Configure from the Options pull-down
menu.
To enter or edit any of the parameters in the Configure dialog box, use
the <TAB> key (or Up and Down arrow keys) to advance to the appropriate
parameter field. If the field is a text field, just enter the appropriate
information. If the field is a series of checkboxes (a pair of square
brackets followed by some text), use the space bar to toggle the check
mark on and off, and the arrow keys to move between checkboxes.
Some of the addressing parameters can be left blank if your network has access
to a BOOTP server; these parameters are indicated below. BOOTP allows your
microcomputer to ask another, "smarter" machine for network addressing
information. Your network administrator will know if you have access to a
BOOTP server; if you don't, you MUST enter all of the addressing information,
or Gopher won't function properly.
To use BOOTP, check the "Use BOOTP" option box. If you use BOOTP,
you may still specify your own parameters; Gopher will use whatever
addressing information you specify, and will use BOOTP to get the addresses
that you leave blank.
There are several network parameters that can usually be left at the
"factory settings"; these parameters are accessed by choosing the
"Advanced..." button.
Basic Configuration Parameters
Server Name
This is the name of any gopher server on the network. Your department may be
running its own gopher server; if not, you are welcome to use our
server, which goes by the name of :
gopher.micro.umn.edu
Gopher will attempt to connect to this server when you issue a "New
Gopher" command. Your explorations are not restricted to information
stored on this particular server, but you will always start off here.
Port Number
This is the port number that Gopher will use to attempt to connect to
the gopher server named above. Currently, gopher servers use port 70
for connections.
Your IP address
This is the IP address of your individual microcomputer or workstation.
See your network administrator for a microcomputer IP address
assignment. If you are using BOOTP, you don't need to change this
field; it can remain blank.
Your Netmask
The netmask parameter has to do with how your local area network is
configured and connected to the backbone network at your work site. See
your network administrator for the correct value to enter here. Many
sites are configured to use a netmask of 255.255.255.0 (the default
value). If you are using BOOTP, you don't need to change this field; it
can remain blank.
Allow Telnet Sessions
If this checkbox is checked, Gopher will recognize Telnet Session items,
and add them to item lists. Note that you MUST also set the environment
variable G_TEL correctly, or Gopher will not be able to use these items.
For more information on telnet session items, see the sections entitled
"Gopher Item Types" and "Gopher and Environment Variables".
New Gopher On Startup
If this checkbox is checked, the program will automatically attempt
to connect to the gopher server entered in the Server Name input
line, whenever Gopher is started. If not checked, you will have to
select New Gopher from the File menu or the status bar to start the
initial gopher session.
Use BOOTP
BOOTP is a network service that allows machines to get addressing
information from a central server. If you have access to BOOTP service,
and this checkbox is checked, you can leave all of the addressing infor-
mation blank, and Gopher will query the BOOTP server. Your network
administrator will be able to tell you if you have access to BOOTP service.
Nameservers
A name server converts a gopher server name into an IP address. You
type in the IP address of your nameserver in this parameter field (see
your network administrator for the value to enter). You may enter up
to four nameserver addresses; they will be tried in the order in which
they are entered.
If you are using BOOTP, you don't need to change this field; it can
remain blank.
Gateways
A gateway is a device which gives your computer access to the outside
world, by transferring information from one type of network to another.
If you want to use Gopher to look at information on servers beyond
your local area network (LAN), you must specify the IP address of your
gateway. You may enter up to four gateway addresses; they will be tried
in the order in which they are entered. Your network administrator can
tell you the addresses of gateways accessible to you.
If you are using BOOTP, you don't need to change this field; it can
remain blank.
Advanced Configuration Parameters
There are several advanced configuration parameters that can be
used to tune network performance; these parameters are best left
alone unless you're sure you know what you're doing! The Advanced...
button will bring up a second dialog box that will allow you to change
these parameters.
Maximum Transfer Unit (bytes)
This is the largest size TCP/IP packet that Gopher will send.
Window Size (bytes)
This is the size of the TCP/IP data buffer.
Maximum Segment (bytes)
This is the maximum size packet that Gopher will accept; since Gopher
cannot accept "fragmented" packets, this number must be small enough
that the server won't be tempted to fragment packets as they are sent.
Query Timeout (sec)
This parameter sets the maximum time allowed for Gopher to send and
receive data from your computer to the gopher server. With the default
value of 20 seconds, Gopher will wait 20 seconds for a response from
the gopher server. If a response does not come through within 20
seconds, Gopher will present an error message at the bottom of the
Gopher window and abort the operation in progress. If a gopher server
is slow and frequently times out, you may need to increase this
value.
Connection Timeout (sec)
When Gopher attempts to connect to a gopher server, this parameter
sets the maximum number of seconds it will wait for the gopher server to
acknowledge your attempt to connect. The default value of 10 seconds is
sufficient for most gopher servers. If an error message is displayed
stating "can't connect" when trying to connect to a server, try
increasing this value.
Name Lookup Timeout (sec)
This parameter sets the maximum number of seconds allowed for the domain
name server on the network to convert a gopher server name to an IP
address. The default value is set to 10 seconds. If an error message is
displayed stating "can't get IP address" when trying to connect to a
gopher server, try increasing this value.
When you have finished entering the parameters, click on the Ok button
to have Gopher save your changes to the configuration. If you decide
you don't want your parameter changes to be saved, click on the Cancel
button.
Configuration Data File
All of the parameters that you enter in the Configure dialog box are
stored in GOPHER.REZ. If this file is damaged or lost, all of your
configuration data will have to be reentered; you will first need to run
Gopher with the /INIT switch to create a new copy of the file.
You can tell Gopher to use an alternate configuration file by setting
the environment variable called G_REZ. See the section entitled "Gopher
and Environment Variables" for further information.
V. Using Gopher
Once you have configured Gopher program, you are ready to start
exploring the Gopher universe. The Gopher universe is made up of many
different computers, all acting as gopher servers. However, you don't
need to know anything about how these computers work, where they are, or
how to connect to them; Gopher handles all of these details for you.
To start exploring, choose "New Gopher" from the File menu, or click on
the words "Alt-G New Gopher" on the status line (if you'd rather use
the keyboard, type Alt-G). Gopher will open a Gopher window, and
attempt to connect to the server that you specified in the configuration
dialog box. If the attempt is successful, Gopher will retrieve a
list of the items that the server knows about. The list will look
something like this:
<F> About Internet Gopher
<D> Administrative Information
<D> Official Daily Bulletin
<S> Search Administrative Policies
Any item on the list can be selected either by moving the selection bar
with the arrow keys and hitting <ENTER>, or by double-clicking with the
mouse.
Gopher Item Types
At the beginning of each line in the item list is a character enclosed
in brackets. This character tells you what the item is; currently,
Gopher knows about the following item types:
Character Type Name Action When Selected
<F> File retrieves the file
<D> Directory shows you more items
<S> Search prompts for text to search for
<P> Phone book prompts for person to look up
<T> Telnet Session connects you to another computer
offering a terminal-based info
system
Files
In the above example, line one refers to a file called "About Internet
Gopher". To see the contents of this file, select the item (see above)
with either the mouse or the keyboard. Gopher will attempt to
retrieve the file, and display it in a separate window. If the file is too
large for Gopher to fit into available memory, it will put up a dialog box
requesting that you specify a filename and directory to save the file in.
You can then open the file with your favorite word processor to see the
contents.
You may also choose to save the information that you get back as a file,
even if it is small enough for Gopher to display immediately in a
window. Just choose "Save File..." from the File menu, and enter the
filename and directory that you want to save the file in.
The window that Gopher uses to display a file can be used to initiate
searches for other files. To search for files containing a particular
word, double-click on the word in the file display window; Gopher
will return a list of all of the files it could find that contain that
word. For example, if the file display window contained
"The Microcomputer Center has information about Macintosh,
IBM, and Zeos personal computers and software."
and you wanted to find files containing references to Zeos, you would
double-click on the word Zeos.
In order to use this feature, you must have a mouse. If you don't have a
mouse, you can still search for files containing text that you specify by
using a search item, explained below.
Directories
Directories are like folders or drawers full of other items. When Gopher
first connects to the gopher server that you specify as your starting point,
the list that you get back shows the contents of the main or "root" directory
of that server.
To see the contents of a directory, select it from the list using either
the mouse or the keyboard. Gopher will request a list of the contents of the
subdirectory that you selected, and will present this list in the Gopher
window.
Gopher keeps track of the directories that you have traversed, and
will allow you to "back up" to previous directories by using the "Back Up"
button. To back up, you can either click once on the "Back" button, or
select the button with the <TAB> key, and then hit <ENTER>. In the
above example, if you clicked on the "Back Up" button, Gopher would
return you to the root directory, and display the original list of
items.
Each time you look at a directory, Gopher attempts to save a "snapshot"
of that directories contents in a local cache. That way, if you descend
a few levels into a directory tree, you can back up again quickly, without
having to re-request listings of directories you've already seen from servers
you've already talked to. The cache is currently limited to the last five
directories that you've looked at, and also to available memory; in other
words, if you look at a directory with hundreds of items in it, the "snapshot"
of that one directory may fill the cache completely.
In order to make sure that the cache doesn't end up holding out-of-date
information, directory snapshots are considered invalid after five minutes,
and are removed to make room for newer ones.
If you anticipate returning to a particular directory on a particular
server, you can use the Bookmark List to save that position in the Gopher
universe. To save a bookmark, first navigate to the directory you want
to remember, and the choose Open Bookmark List from the File menu. Once
the bookmark list opens up, click on the Add button; you will be prompted
for a name for the bookmark. To return to the bookmarked position later,
just open the bookmark list and select the bookmark you wish to return
to.
Search Items
A search item is a computer that can search various gopher servers for files
containing text that you specify. If you select a search item, a dialog box
will pop up for you to enter your search text in. To start the search, click
on the "Search" button, or just hit the <ENTER> key.
The search item returns a list of files that it knows about that
contain ALL of the text that you enter in the input box. If you entered
the word "salmon", the search item would return a list of all of the
files containing that word. If you entered "salmon spinach", the search
item will return a list of files that contain both the word "salmon"
and the word "spinach"; it would NOT return the names of files that had
only one of the two words.
Search Items and Logical Operators
Logical operators are special words that allow you to set up specific
search conditions. The logical operators "and", "or", and "not" are
supported by search items. You can use one or more of these operators
to narrow the field of your search.
For example, suppose you want to find files that contain the word
"salmon" or the word "spinach", but not both. You can do this by
entering "salmon or spinach" in the input box. You can also use the
word "and" to explicitly indicate that the files you're searching for
must contain both words; this allows you to set up specific search
conditions by using multiple logical operators. Logical operators are
evaluated in right-to-left order; the search pattern "spinach and salmon
or broccoli" would result in a list of files that contained the word
spinach and the word salmon, or just the word broccoli.
To exclude words from the search pattern, use "not". The search phrase
"macintosh not hypercard" would produce a list of files containing at
least one reference to macintosh, and no references to hypercard.
You can substitute the | character for the operator "or", and the &
character for the operator "and".
Telnet Session Items
A telnet session item is a way to allow you access to information
services that expect to communicate through generic "terminals". When
you select a telnet session item, Gopher will execute the terminal
emulator if your choice, passing the name, address, and/or port number
required to connect to the terminal-based service.
Gopher will NOT recognize these items by default; you need to tell Gopher
that you wish to have telnet session items included in directory listing.
To do this, make sure that the Allow Telnet Sessions checkbox in the
Configure dialog is checked;
In addition to enabling access to telnet sessions, you must tell Gopher
the name of your terminal emulation program, where it lives on your
disk, and what parameters need to be passed to open the session. Gopher
reads this information from an environment variable called G_TEL; for
information about setting up G_TEL, see the section entitled "Gopher and
Environment Variables".
Phone Books
Phone book items are pointers to databases that contain information about
people's phone numbers, office locations, e-mail addresses, and so on;
these databases are called CSO or QI servers. When you select a phone book
item, a dialog box will pop up, and Gopher will ask the database server for
a list of items that you can ask about. Once the list of these items is
built, you'll build up a query by:
1. selecting an item from the list, which will create an input line
2. typing in the search key next to the item name
You can build queries of up to five items; if you want to change the query,
selecting the Clear button will clear all of the items you've chosen.
Once the query is set up, select the Lookup button, and the query will
be sent to the server. Any matching items will be displayed in a
separate window, and can be saved to disk using the File menu's Save
File... command.
Item Information
If you'd like to know more about an item on the list, such as the name of
the machine that it resides on, you can open an item inspector by choosing
Item Inspector from the File menu.
VI. Gopher and Environment Variables
The default behavior of Gopher can be altered by the use of environment
variables. Environment variables are "flags" that you can set from the
DOS command line; these variables are then available for programs to
examine and use. To set an environment variable, you type
set VARIABLE=VALUE
replacing VARIABLE with the name of the variable you'd like to set, and
VALUE with the value you want to set it to. For more information on
environment variables, refer to your DOS manual.
Gopher uses four environment variables: G_OVR, G_REZ, G_BMK, and G_TEL.
Only one of them must be set; you will not be able to access telnet session
items if G_TEL is undefined. The other three, G_REZ, G_BMK, and G_OVR,
are optional; Gopher will use reasonable defaults (see below) if they aren't
set.
The G_REZ Environment Variable
By default, Gopher expects to get resources and configuration information
out of a file called GOPHER.REZ, in the same directory as GOPHER.EXE. You
can tell Gopher to use a different directory and/or filename by defining
G_REZ to the complete path and filename that you want used.
For example, if your configuration file is called GOPHER.FOO, and it lives
on a network drive called I:, in the directory FILES, you could set G_REZ
like this:
set G_REZ=I:\FILES\GOPHER.FOO
and Gopher would use that file instead of GOPHER.REZ
Network administrators can use G_REZ to create separate configuration
files for each client on the network; however, since Gopher reads from AND
writes to the resource file, it CANNOT BE PLACED IN A READ-ONLY DIRECTORY.
The G_OVR Environment Variable
This variable works exactly like G_REZ, except that it's used to define
and alternate overlay file. By default, Gopher will look for GOPHER.OVR
in the same directory as GOPHER.EXE; you can tell Gopher to use a different
overlay file by setting G_OVR.
The overlay file is opened in read-only mode, so it can be placed on a
network drive in a read-only directory.
The G_BMK Environment Variable
This variable also works like G_REZ, but it tells Gopher where to store bookmarks.
By default, Gopher will save any bookmarks you create in GOPHER.BMK,
in the same directory as GOPHER.EXE; you can tell Gopher to use a different
bookmark file by setting G_BMK.
The G_LOG Environment Variable
This variable tells Gopher where the error log file should be kept. By
default, Gopher will write to the file GOPHER.LOG, in the same directory
as GOPHER.EXE.
The G_TEL Environment Variable
In order to be able to use telnet session items, you MUST set an
environment variable called G_TEL. It should be set to the complete
path to the executable file, including the filename, and the parameters
you want to pass to the telnet program.
Gopher knows how to interpret certain symbols within the G_TEL string,
replacing them with information that can't be generated until
immediately before the session is started. The symbols and what they're
replaced by at runtime are:
%a address of target machine
%n name of target machine
%p port number of service on target machine
At a minimum, you need to include the symbols %n and %p as parameters;
Gopher will replace these with the name and port number of the machine
it needs to connect to.
So, for example, if the telnet program you're using was in the same
directory as gopher, C:\GOPHER, and it was called TELAPP.EXE, you'd
set G_TEL like this:
C:\> set G_TEL=C:\GOPHER\TELAPP.EXE %n %p
If your telnet program needs a "#" in front of the port number, you'd
set G_TEL like this:
C:\> set G_TEL=C:\GOPHER\TELAPP.EXE %n #%p
If you are setting this variable from within a batch file, such as
AUTOEXEC.BAT, remember that DOS will interpret a % as an environment
variable, and batch files are executed by DOS, not by Gopher. If you
use the above example string in a batch file, G_TEL will be set like
this:
C:\GOPHER\TELAPP.EXE #
DOS looks at the %a and %p, sees that they aren't defined in the environment,
and replaces them with null strings. In order to prevent this, always use
two percent signs when setting environment variables from a batch file:
SET G_TEL=C:\GOPHER\TELAPP.EXE %%n #%%p
Just before a telnet session is executed, Gopher writes the command string
to the logfile, GOPHER.LOG. Since this happens AFTER the vaiable substitution
occurs, you can look at the logfile to see how Gopher is interpreting the
G_TEL variable; this may help in debuggin problems with telnet sessions.
The MYIP Environment Variable
Gopher will search the environment for a variable called MYIP; if found,
Gopher will ignore the information in the configuration file regarding
your IP address, and use this address instead.
The MYMASK Environment Variable
This variable works just like MYIP, except that it will be used to set
the netmask of your machine.
VII. Command-Line Parameters
Command-line parameters can also be used to customize Gopher's
behaviour. The environment variables G_TEL, G_REZ, G_BMK, and G_OVR can
all be overridden on the command line, by using the following switches:
/R <path and filename to use for resource file>
/B <path and filename to use for bookmark storage>
/O <path and filename to use for overlay file>
/L <path and filename to use for error log file>
/T <string to pass to shell for telnet sessions>
To use any of these switches, type them on the command line, after GOPHER.
For example, to set the overlay file to GOPHER.OVR in the directory C:\FOO,
you would start Gopher by typing
GOPHER /O C:\FOO\GOPHER.OVR
Note that you MUST include a space between the switch and the option. Command-
line switches will override default settings and environment variables in all
cases.
Finally, typing
GOPHER /?
will list all of the command-line options.
VIII. Summary
Other Gopher Software
In addition to PC Gopher II, Macintosh, NeXTStep, XWindows, and vt100
versions of the Gopher program are available; the user interfaces are
roughly the same across all platforms. This consistency helps simplify
training for departments that have mixed computing environments.
Gopher server software is also available for the Macintosh. If you or
your department would like to set up a gopher server to distribute
information, we would be happy to help you.
If you want to discuss Gopher, call or visit the Microcomputer
HelpLine. If you visit the HelpLine, our consultants can demonstrate Gopher
for you.
Acknowledgments
We wish to extend our thanks to Borland International of Scotts Valley,
California, for continued excellence in the enhancement of their Turbo
Pascal product. We developed Gopher using Borland's TurboVision, an
object-oriented library of special-purpose routines provided with
Borland's newest release of Turbo Pascal, Version 6.0.
For the use of the Clarkson Packet Drivers, the foundation on which our
network products are based, we gratefully acknowledge Clarkson College
of Potsdam, New York.